home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
ICON_8
/
CALLING_
/
CALLBOTH.ICN
next >
Wrap
Text File
|
1990-04-08
|
1KB
|
56 lines
procedure main()
write(&version)
write(&host)
every write(&features)
write("the sin of 45 is ", callout("asinh", "45"))
callout("printf", "this is a test")
write("the string is 25;", " the number = ", callout("atoi", "25"))
recurse(3)
end
procedure recurse(n)
static cnt
initial cnt := 0
write("in routine recurse")
write("cnt = ", cnt, "; n = ", n)
cnt := cnt + 1
if (cnt < n) then
callout("myroutine")
end
procedure wordcount(n)
local t, line, x, i
static letters
initial letters := &lcase ++ &ucase
t := table(0)
while line := read() do
line ? while tab(upto(letters)) do
t[tab(many(letters))] +:= 1
x := sort(t,3)
every i := 1 to *x - 1 by 2 do
write(left(x[i],n),x[i + 1])
return "true"
end
procedure testing(n)
static cnt
initial cnt := 2
/n := -1
if (n < 0) then
fail
else if (n = 0) then
return n
while n > 0 do {
m := cnt
cnt -:= 1
suspend m
}
end
procedure junk()
write(reverse("this is not a test"))
display()
write(find("is", "this is a test"))
end